package com.kitty.game.activity.model.user;

import com.kitty.common.model.Pos;
import lombok.Getter;
import lombok.Setter;
import org.nutz.lang.util.NutMap;

import java.util.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;


/**
 * 角色活动
 */
@Getter
@Setter
public class RoleActivity {
    /**
     * 活动已经完成次数
     */
    private NutMap finishCounts = new NutMap();

    /**
     * 正在进行刷道每轮时间
     */
    private Map<String, LinkedList<Integer>> shuaDaoUsedTime = new HashMap<>(6);
    /**
     * 最近十轮刷道耗时(单位秒)
     */
    private Map<String, Integer> tenShuaDaoUsedTime = new HashMap<>();
    /**
     * 刷道积分
     */
    private int shuaDaoScore = 0;
    /**
     * 怪物数量，理论上应该从战斗中获取的，但貌似战斗战斗时会清数据，接口传进来有点麻烦
     */
    private transient int monsterCount;
    /**
     * 刷道积分奖励领取状态, key: 积分, 领取状态
     */
    private Map<Integer, Boolean> shuaDaoFetchStatus = new HashMap<>();

    /**
     * 通天塔数据
     */
    private RoleTowerData roleTowerData = new RoleTowerData();

    /**
     * 玩家活跃度
     */
    private float liveness;

    /**
     * 活跃度奖励领取状态
     */
    private Map<Integer, Boolean> livenessRewardFetchStatus = new HashMap<>();

    /**
     * 挖宝的类型(分普通藏宝图和超级藏宝图的挖宝)
     */
    private byte digTreasureType;
    /**
     * 挖宝的目标位置
     */
    private Pos digTreasurePosition;

    /**
     * 七日登录奖励领取奖励
     */
    private Map<Byte, Boolean> servenDayRewardStatus = new HashMap<>();

    /**
     * 砸蛋
     */
    private Map<Byte, String> zadan = new HashMap<>();

    /**
     * 首日充值奖励
     */
    private NutMap chargeActivity = new NutMap();

    /**
     * 充值积分
     */
    private int rechargeScore;
    /**
     * 累计充值积分
     */
    private short totalRechargeScore;

    /**
     * 购买新服助力礼包的次数
     */
    private int buyNewHelpGiftCount;

    /**
     * 副本奖励标识，true为有奖励领取
     */
    private boolean dugeonReward;

    /**
     * 剩余挑战神魔活动时间
     */
    private int remainDevilTime;
    private Map<Integer, Integer> devilKillCounts = new HashMap<>(5);
    private int meiriLevel = 0;



    /**
     * 每日一次充值30得3倍，凌晨清除
     */
    private boolean charge30 = true;

    private boolean chenghao177 = false;
    private boolean chenghao188 = false;
    private boolean chenghao288 = false;
    private boolean chenghao199 = false;
    private boolean chenghao477 = false;
    private boolean chenghao488 = false;
    private boolean chenghao499 = false;
    private boolean chenghao666 = false;
    private boolean chenghao677 = false;
    private boolean chenghao688 = false;


    private boolean luobotaozi = false;




    private boolean activity177 = false;
    private boolean activity188 = false;
    private boolean activity288 = false;
    private boolean activity199 = false;
    private boolean activity477 = false;
    private boolean activity488 = false;
    private boolean activity499 = false;
    private boolean activity666 = false;
    private boolean activity677 = false;
    private boolean activity688 = false;

    /**
     * 押镖次数
     */
    private int yaBiaoCount = 0;


    /**
     * 每个玩家首次单笔充值98、198、328、648、1000、2000、3000、4000、5000得双倍倍元宝和积分
     */
    private List<Integer> chargeAppoints = new ArrayList<>();


    public void dailyReset() {
        yaBiaoCount = 0;//押镖次数
        finishCounts = NutMap.NEW();
        liveness = 0;
        livenessRewardFetchStatus = new HashMap<>();
        zadan = new HashMap<>();
        remainDevilTime = 0;
        devilKillCounts = new HashMap<>(5);
        charge30 = true;
    }

    //每日零点重置
//    public void daily0Reset() {
//    	charge30 = true ;
//    }
    //其他指定金额数据重置
    public void dailyChargeAppointsReset() {
        chargeAppoints = new ArrayList<>();
    }

    //后加
    public NutMap getChargeActivity() {
        return this.chargeActivity;
    }

    public int getRechargeScore() {
        return this.rechargeScore;
    }

    public short getTotalRechargeScore() {
        return this.totalRechargeScore;
    }

    public int getBuyNewHelpGiftCount() {
        return this.buyNewHelpGiftCount;
    }

    public boolean isDugeonReward() {
        return this.dugeonReward;
    }

    public int getRemainDevilTime() {
        return this.remainDevilTime;
    }

    public Map<Integer, Integer> getDevilKillCounts() {
        return this.devilKillCounts;
    }

    public int getMeiriLevel() {
        return this.meiriLevel;
    }

    public boolean isCharge30() {
        return this.charge30;
    }

    private boolean activity30 = false;

    public boolean isActivity177() {
        return this.activity177;
    }

    public boolean isActivity188() {
        return this.activity188;
    }

    public boolean isActivity288() {
        return this.activity288;
    }

    public boolean isActivity199() {
        return this.activity199;
    }

    public boolean isActivity477() {
        return this.activity477;
    }

    public boolean isActivity488() {
        return this.activity488;
    }

    public boolean isActivity499() {
        return this.activity499;
    }

    public boolean isActivity666() {
        return this.activity666;
    }

    public boolean isActivity677() {
        return this.activity677;
    }

    public boolean isActivity688() {
        return this.activity688;
    }


    public boolean isLuobotaozi() {
        return this.luobotaozi;
    }





    public List<Integer> getChargeAppoints() {
        return this.chargeAppoints;
    }

    public Map<Integer, Boolean> getLivenessRewardFetchStatus() {
        return this.livenessRewardFetchStatus;
    }

    public byte getDigTreasureType() {
        return this.digTreasureType;
    }

    public Pos getDigTreasurePosition() {
        return this.digTreasurePosition;
    }

    public Map<Byte, Boolean> getServenDayRewardStatus() {
        return this.servenDayRewardStatus;
    }

    public Map<Byte, String> getZadan() {
        return this.zadan;
    }

    public RoleTowerData getRoleTowerData() {
        return this.roleTowerData;
    }

    public float getLiveness() {
        return this.liveness;
    }

    public Map<Integer, Boolean> getShuaDaoFetchStatus() {
        return this.shuaDaoFetchStatus;
    }

    public int getShuaDaoScore() {
        return this.shuaDaoScore;
    }

    public int getMonsterCount() {
        return this.monsterCount;
    }

    public NutMap getFinishCounts() {
        return this.finishCounts;
    }

    public Map<String, LinkedList<Integer>> getShuaDaoUsedTime() {
        return this.shuaDaoUsedTime;
    }

    public Map<String, Integer> getTenShuaDaoUsedTime() {
        return this.tenShuaDaoUsedTime;
    }

    public void setFinishCounts(NutMap finishCounts) {
        this.finishCounts = finishCounts;
    }

    public void setShuaDaoUsedTime(Map<String, LinkedList<Integer>> shuaDaoUsedTime) {
        this.shuaDaoUsedTime = shuaDaoUsedTime;
    }

    public void setTenShuaDaoUsedTime(Map<String, Integer> tenShuaDaoUsedTime) {
        this.tenShuaDaoUsedTime = tenShuaDaoUsedTime;
    }

    public void setShuaDaoScore(int shuaDaoScore) {
        this.shuaDaoScore = shuaDaoScore;
    }

    public void setMonsterCount(int monsterCount) {
        this.monsterCount = monsterCount;
    }

    public void setShuaDaoFetchStatus(Map<Integer, Boolean> shuaDaoFetchStatus) {
        this.shuaDaoFetchStatus = shuaDaoFetchStatus;
    }

    public void setRoleTowerData(RoleTowerData roleTowerData) {
        this.roleTowerData = roleTowerData;
    }

    public void setLiveness(float liveness) {
        this.liveness = liveness;
    }

    public void setLivenessRewardFetchStatus(Map<Integer, Boolean> livenessRewardFetchStatus) {
        this.livenessRewardFetchStatus = livenessRewardFetchStatus;
    }

    public void setDigTreasureType(byte digTreasureType) {
        this.digTreasureType = digTreasureType;
    }

    public void setDigTreasurePosition(Pos digTreasurePosition) {
        this.digTreasurePosition = digTreasurePosition;
    }

    public void setServenDayRewardStatus(Map<Byte, Boolean> servenDayRewardStatus) {
        this.servenDayRewardStatus = servenDayRewardStatus;
    }

    public void setLuobotaozi(boolean luobotaozi) {
        this.luobotaozi = luobotaozi;
    }

    public void setZadan(Map<Byte, String> zadan) {
        this.zadan = zadan;
    }

    public void setChargeActivity(NutMap chargeActivity) {
        this.chargeActivity = chargeActivity;
    }

    public void setRechargeScore(int rechargeScore) {
        this.rechargeScore = rechargeScore;
    }

    public void setTotalRechargeScore(short totalRechargeScore) {
        this.totalRechargeScore = totalRechargeScore;
    }

    public void setBuyNewHelpGiftCount(int buyNewHelpGiftCount) {
        this.buyNewHelpGiftCount = buyNewHelpGiftCount;
    }

    public void setDugeonReward(boolean dugeonReward) {
        this.dugeonReward = dugeonReward;
    }

    public void setRemainDevilTime(int remainDevilTime) {
        this.remainDevilTime = remainDevilTime;
    }

    public void setDevilKillCounts(Map<Integer, Integer> devilKillCounts) {
        this.devilKillCounts = devilKillCounts;
    }

    public void setMeiriLevel(int meiriLevel) {
        this.meiriLevel = meiriLevel;
    }

    public void setCharge30(boolean charge30) {
        this.charge30 = charge30;
    }

    public void setActivity177(boolean activity177) {
        this.activity177 = activity177;
    }

    public void setActivity188(boolean activity188) {
        this.activity188 = activity188;
    }

    public void setActivity199(boolean activity199) {
        this.activity199 = activity199;
    }

    public void setActivity477(boolean activity477) {
        this.activity477 = activity477;
    }

    public void setActivity488(boolean activity488) {
        this.activity488 = activity488;
    }

    public void setActivity499(boolean activity499) {
        this.activity499 = activity499;
    }

    public void setActivity666(boolean activity666) {
        this.activity666 = activity666;
    }

    public void setActivity677(boolean activity677) {
        this.activity677 = activity677;
    }

    public void setActivity688(boolean activity688) {
        this.activity688 = activity688;
    }

    public void setActivity288(boolean activity288) {
        this.activity288 = activity288;
    }


    public void setChargeAppoints(List<Integer> chargeAppoints) {
        this.chargeAppoints = chargeAppoints;
    }
}

